import request from '@/utils/request'
import { encryptionData } from '@/utils/com'
import Qs from 'qs'

/* 资料中心-列表 */
export function getDataList(data) {
  return request({
    url: '/jcdSys/jcdDataUpload/list',
    method: 'get',
    headers: encryptionData(data, '/jcdDataUpload/list'),
    params: data
  })
}

/* 资料中心-详情 */
export function getDataDetail(data) {
  return request({
    url: '/jcdSys/jcdDataUpload/getById',
    method: 'get',
    headers: encryptionData(data, '/jcdDataUpload/getById'),
    params: data
  })
}

/* 资料中心-保存 */
export function saveData(data) {
  return request({
    url: '/jcdSys/jcdDataUpload/saveDataUpload',
    method: 'post',
    headers: encryptionData(data, '/jcdDataUpload/saveDataUpload'),
    data: Qs.stringify(data)
  })
}

/* 资料中心-删除 */
export function delData(data) {
  return request({
    url: '/jcdSys/jcdDataUpload/delById',
    method: 'DELETE',
    headers: encryptionData(data, '/jcdDataUpload/delById'),
    data: Qs.stringify(data)
  })
}

/* 资料中心-审核 */
export function auditDataUpload(data) {
  return request({
    url: '/jcdSys/jcdDataUpload/auditDataUpload',
    method: 'post',
    headers: encryptionData(data, '/jcdDataUpload/auditDataUpload'),
    data: Qs.stringify(data)
  })
}
